c<?php
class Printer
{
    static $obj=null;
    private function _construct(){

    }
    static function getObj(){
        if(is_null(self::$obj)){
            self::$obj=new Peinter();
        }
        return self::$obj;
    }
}

$p1=Printer::getInstance();
$p2=Printer::getInstance();
var_dump($p1);
var_dump($p2);
var_dump($p2==$p1);
?>